package util;
import java_cup.runtime.Symbol;


public class Main {
	
	private static final String FILE_NAME = "entrada.txt";
	
	public static void main (String[] args) {
		try {
			CLexer scanner = new CLexer( new java.io.FileReader(FILE_NAME) );
			parser p = new parser(scanner);
			Symbol parseResult = p.parse();
			if (parseResult.toString().equals("#0"))
				System.out.println("File " + FILE_NAME + " compiled successfully");
			else
				System.out.println(parseResult);
			
			System.out.println("Generated Assembly: ");
			System.out.println(SemanticAnalysis.assemblyCode);
		} catch (Exception e) {
			System.out.println(e);
		}
	}
}

